<!-- 派工信息组件 -->
<template>
  <div class='dispatchInformation'>
    <div class="dispatchInformation-title">
      <div class="dispatchInformation-title-left"></div>
      <span>任务派工</span>
      <div class="dispatchInformation-title-right"></div>
    </div>
    <div class="dispatchInformation-content" v-if="data.length>0">
      <el-form>
        <el-row>
          <el-col :span="8">
            <el-form-item label="派工人员">
              {{data[0].createBy}}
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="派工时间">
              {{data[0].createTime}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="班组名称">
              {{data[0].groupName}}
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="任务负责人">
              {{data[0].chairmanName}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="其他成员">
          {{data[0].others}}
        </el-form-item>
        <el-form-item label="备注">
          {{data[0].remark}}
        </el-form-item>
      </el-form>
    </div>
    <div class="dispatchInformation-title">
      <div class="dispatchInformation-title-left"></div>
      <span>质检派工</span>
      <div class="dispatchInformation-title-right"></div>
    </div>
    <div class="dispatchInformation-content" v-if="data.length>0">
      <el-form>
        <el-row>
          <el-col :span="8">
            <el-form-item label="派工人员">
              {{data[1].createBy}}
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="派工时间">
              {{data[1].createTime}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="班组名称">
              {{data[1].groupName}}
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="任务负责人">
              {{data[1].chairmanName}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="备注">
          {{data[1].remark}}
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'dispatchInformation',
    props: {
      data: undefined
    },
    data() {
      return {
      }
    },
    watch: {
      data: {
        handler(val) {
          console.log('dispatchInformationData', val);
        }
      }
    },
    methods: {

    }
  }
</script>

<style lang="scss" scoped>
.dispatchInformation{
  &-title{
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    span{
      width: fit-content;
      padding: 8px;
      border: 1px solid #333;
      border-radius: 5px;
    }
    &-left{
      width: 50%;
      height: 1px;
      background: #333;
    }
    &-right{
      flex: 1;
      height: 1px;
      background: #333;
    }
  }
}
</style>